<?php

namespace TestComponents\src;

use Exception;
use Remoteshell\PhpBotSdk\loader\STD;
use Remoteshell\PhpBotSdk\loader\ComponentsRegister;

class Main extends STD
{
    private ComponentsRegister $register;

    /**
     * 初始化方法
     * @return void
     * @throws Exception
     */
    public function __init__(): void
    {
        $this->register = new ComponentsRegister();
        $this->AutoRegister();
    }

    public function AutoRegister(): void
    {
        $this->register::Register("SendMessage", function (string $param1, string $param2){
            echo $param1, $param2;
        });
    }
}
